<template>
  <el-dialog
    title="删除确认"
    :visible.sync="showDialog"
    :close-on-click-modal="false"
    append-to-body
    width="30%"
    center
  >
    <span>确认删除该条记录吗</span>
    <span slot="footer" class="dialog-footer">
      <el-button @click="cancelTask">取 消</el-button>
      <el-button type="danger" @click="deleteTask">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  props: {
    showDialog: Boolean,
    row: Object
  },
  data: function() {
    return {}
  },
  computed: {
    isShow: function() {
      return this.showDialog
    }
  },
  methods: {
    deleteTask: function() {
      this.$emit('deleteTask', this.row)
    },
    cancelTask: function() {
      this.$emit('cancelTask', this.row)
    }
  }
}
</script>
